import request from '@/utils/request'

export function getroleListAPI(){
    return request({
        url:'/park/sys/role',
        method:'GET',
        
    })
}

export function createRoleUserAPI(obj){
    return request({
        url:'/park/sys/role',
        method:'POST',
        data:obj
    })
}

export function getTreeListAPI() {
    return request({
      url: '/park/sys/permision/all/tree',
      method:'GET'
    })
  }

export function getRoleDetailAPI(roleId) {
    return request({
      url: '/park/sys/role/' + roleId,
      method:'GET',
    })
  }

export function getRoleUserAPI(roleId) {
    return request({
      url: '/park/sys/roleUser/' + roleId,
      method:'GET',
    })
  }

  export function updateRoleAPI(data) {
    return request({
      url: '/park/sys/role',
      method: 'PUT',
      data
    })
  }

  export function delRoleUserAPI(roleId) {
    return request({
      url: `/park/sys/role/${roleId}`,
      method: 'DELETE'
    })
  }

  
